package com.enhe.gck.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.kuangkie.carbon.record.Updatable;
import com.kuangkie.carbon.record.annotation.Attribute;
import com.kuangkie.carbon.record.annotation.CarbonRecord;
import com.kuangkie.carbon.record.annotation.RecordCode;
import com.kuangkie.carbon.uid.model.UidManager;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

// 车辆管理
@Data
@CarbonRecord("hwane16654")
public class Car implements Updatable {
    @JSONField(name = "唯一编码")
    @RecordCode
    private Long id = UidManager.getLongUID();

    // 车牌号
    @JSONField(name = "车牌号")
    @Attribute("hwan16656")
    private String carNo;

    // 车架号
    @JSONField(name = "车架号")
    @Attribute("hwan16657")
    private String vin;

    // 行驶证过期时间
    @JSONField(name = "行驶证过期时间")
    @Attribute("hwan16659")
    private Date expTimeOfDrivingLicense;

    // 类型
    @JSONField(name = "类型")
    @Attribute("hwan16660")
    private String vehicleType;

    // 车型类型
    @JSONField(name = "车型类型")
    @Attribute("hwan16663")
    private String vehicleStructureType;

    // 是否可用
    @JSONField(name = "是否可用")
    @Attribute("hwan16664")
    private String useFlag;

    // 是否检查红外
    @JSONField(name = "是否检查红外")
    @Attribute("hwan18128")
    private boolean infraredCheck;

    @JSONField(name = "命令")
    @Attribute("hwan19695")
    private String command;

    @JSONField(name = "删除")
    @Attribute("hwan20268")
    private Boolean isDelete;

    @JSONField(name = "皮重")
    @Attribute("hwan19374")
    private BigDecimal weightTare;
    @JSONField(name = "皮重下限")
    @Attribute("hwan20722")
    private BigDecimal weightTareDown;
    @JSONField(name = "皮重上限")
    @Attribute("hwan20723")
    private BigDecimal weightTareUp;
    @JSONField(name = "最新皮重")
    @Attribute("hwan20724")
    private BigDecimal weightTareNew;
    @JSONField(name = "最新皮重更新时间")
    @Attribute("hwan20725")
    private LocalDateTime weightTareNewTime;
    @Override
    public String getRecordCode() {
        return this.id == null ? null : this.id.toString();
    }
}